using TFS.Kanban.Commons.Commands;
using TFS.Kanban.Modules.KanbanBoard.Interfaces;

namespace TFS.Kanban.Modules.KanbanBoard.Commands
{
	public class ChangeColorCommand : CommandBase
	{
		readonly ICanChangeColor model;

		/// <summary>
		/// Initializes a new instance of the ChangeColorCommand class.
		/// </summary>
		/// <param name="model"></param>
		public ChangeColorCommand( ICanChangeColor model )
		{
			this.model = model;
		}

		public override void Execute( object parameter )
		{
			model.ColorChanged( parameter as string );
		}
	}
}
